package io.yunho.yunho.interview.two.java8.webflux;

import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: Jason
 * @date: 2021/5/11 19:35
 * @description:
 */
@Configuration
public class ServletConfig {
    @Bean
    public ServletRegistrationBean servletRegistrationBean(){
        return new ServletRegistrationBean(new ServletTest(),"/servletkk");
    }

    @Bean
    public ServletRegistrationBean asyncServlet(){
        return new ServletRegistrationBean(new AsyncServlet(),"/asycnss");
    }
    @Bean
    public ServletRegistrationBean sse(){
        return new ServletRegistrationBean(new SSE(),"/sse");
    }
}
